{$header}
<tagLib name="html" />
<style type="text/css">
     .wrap-word{word-wrap:break-word;}
     td {
          white-space: pre-wrap;       /* css-3 */
           white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
            white-space: -pre-wrap;      /* Opera 4-6 */
             white-space: -o-pre-wrap;    /* Opera 7 */
              word-wrap: break-word;       /* Internet Explorer 5.5+ */
     }
</style>
<div id="main" class="main" >
<!-- 主体内容  -->
<div class="content" >
<!--  功能组区域  -->
<php>
    function refLink($id){
        $log = M('Weblog')->getById($id);
     echo ('<a href="'.$log['ref'].'" target="_blank">'.$log['ref_type'].'</a>');
	}
    function urlLink($id){
        $log = M('Weblog')->getById($id);
     echo ('<a href="'.$log['url'].'" target="_blank">'.$log['title'].'</a>');
	}
</php>
<div class="btn-toolbar">
	<div class="btn-group">
		<button class="btn btn-primary" onclick="add()"> <i class="icon-plus icon-white"></i>新增</button>
		<button class="btn btn-primary" onclick="foreverdel()"> <i class="icon-trash icon-white"></i>删除</button>
	</div>
		导出
		<a href="__URL__/export_order?{$parameters}&etype=order&action={:ACTION_NAME}" class="btn">搜索结果</a>
		<span class="label label-success">:{$sum_should_pay}</span>
       <a href="__URL__/index/status/0"> 待处理订单:<span class="label label-warning">{$count_todo}</span></a>
        <a href="__URL__/index/status/1" class="offset1">处理中订单:<span class="label label-important">{$count_doing}</span></a>
	<form class="search-form" method='get' action="__URL__">
	    订单号<input type="text" class="search-query span1" name="mall_no" <notempty name='_REQUEST.mall_no'>
		<php>echo 'value="'.urldecode($_REQUEST['mall_no']).'"'</php>
		<else/>
		placeholder="订单号查找" </notempty> >
       处理状态:{:configList(C('process_status'),$_REQUEST['status'],'status','span1')}
       异常订单: <select id="" name="exception_order" class="span1"><option value="">--请选择--</option>
         <option value="0" <eq name="_REQUEST.exception_order" value="0">selected</eq> >正常</option>
         <option value="1" <eq name="_REQUEST.exception_order" value="1">selected</eq> >异常</option>
       </select>
	   备注<input type="text" class="search-query span2" name="content" <notempty name='_REQUEST.content'>
		<php>echo 'value="'.urldecode($_REQUEST['content']).'"'</php>
		<else/>
		placeholder="search content" </notempty> >

	   创建人{:modList('User',$_REQUEST['creater_id'],'span2','creater_id','status')}

	回复
	<input type="text" class="search-query span2" name="reply" <notempty name='_REQUEST.reply'>
		<php>echo 'value="'.urldecode($_REQUEST['reply']).'"'</php>
		<else/>
		placeholder="回复内容"
	</notempty>
	>
    <!--Advaced Search-->
     <div  id="searchM" class=" none search cBoth" >
		每页显示 <input type="text" class="span1" name="listRows" value="{$_REQUEST.listRows}">
	   IP<input type="text" class="search-query span2" name="ip" <notempty name='_REQUEST.ip'>
		<php>echo 'value="'.urldecode($_REQUEST['ip']).'"'</php>
		<else/>
		placeholder="ip" </notempty> >

	   来源URL<input type="text" class="search-query span2" name="ref" <notempty name='_REQUEST.ref'>
		<php>echo 'value="'.urldecode($_REQUEST['ref']).'"'</php>
		<else/>
		placeholder="refer url" </notempty> >
		
		<select name="time_type" class="span1"> 
			<option value="">--时间类型--</option>
			<option value="3" selected >创建时间</option> 
		</select>
		从<input type="text" class="span2"  name="start_time" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<notempty name='_REQUEST.start_time'>{$_REQUEST.start_time}</notempty>">
		到<input type="text" class="span2" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" name="end_time" id="end_time" value="<notempty name='_REQUEST.end_time'>{$_REQUEST.end_time}</notempty>" >
     </div>
	<input type="submit" class="btn btn-primary input-middle" value="搜  索">
    <a class="btn btn-info" onclick="showHideSearch()" href="javascript:void(0)" ><i class="icon-chevron-down icon-white"></i> 更多</a>
	</form>
	
</div>
<!-- 功能组区域结束 -->
<!-- 列表显示区域  -->
<!--<div class="page">{$page}</div> -->
<div class="list" >
<div id="result" class="result none"></div><html:list id="checkList" pk="id" action="true" style="table table-bordered table-striped" checkbox="true"  datasource="list" show="id:编号|4%,mall_no:原单号:reply,content:备注,creater_id|getModelName=User:创建人,depart|getConfigVal=depart:负责部门,create_time|toDate:创建时间,exception_order|getConfigVal=exception_order:异常订单,status|getConfigVal=process_status:处理状态,reply:回复,receiver_id|getModelName=User:回复人,update_time|toDate:回复时间" actionlist="reply:回复:id"/>
</div>
<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->
</div>
<!-- 主体内容结束 -->
</div>
<include file="Public:footer"/>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
<script type="text/javascript">
function reply(id){
	var keyValue;
	if (id)
	{
		keyValue = id;
	}else {
		keyValue = getSelectCheckboxValue();
	}
	if (!keyValue)
	{
		alert('请选择编辑项！');
		return false;
	}
	location.href =  URL+"/reply/id/"+keyValue;
    
}
</script>
